<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base
	href="<%=request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
					+ request.getContextPath() + "/"%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="statics/js/jquery-1.12.4.js"
	charset="UTF-8"></script>
<script type="text/javascript" src="statics/js/goods_order.js"
	charset="UTF-8"></script>
<script src="statics/layer/layer.js"></script>
<script type="text/javascript" src="statics/js/script/jquery.pagination.js" charset="UTF-8"></script>
<link rel="stylesheet" type="text/css"
	href="statics/css/goods_order.css" />
<link rel="stylesheet" type="text/css" href="statics/css/pagination.css" />
<title>订单确认</title>
</head>
<body>
	<jsp:include page="top.jsp"></jsp:include>
	<div class="center">
		<jsp:include page="goods_step.jsp"></jsp:include>
		<div class="current">
			<c:choose>
				<c:when test="${param.type==1 }">
					<span>当前位置：日租包车></span>
				</c:when>
				<c:when test="${param.type==2 }">
					<span>当前位置：接机送机></span>
				</c:when>
				<c:otherwise>
					<span>当前位置：自驾租车></span>
				</c:otherwise>
			</c:choose>
			<span style="color:#AA0000;">订单详情</span>
		</div>
		<div class="right">
			<div class="dateTime" data-page="goods/order?id=${param.id }&">
				<jsp:include page="goods_dateTime.jsp"></jsp:include>
			</div>
			<div class="notice">
				<div class="title">
					<span>租车须知</span>
				</div>
				<div class="content">
					<p>
						提车时请携带并出示以下证件的原件：<br> 1. 本人有效身份证件 <br>
						&nbsp;&nbsp;&nbsp;a）国内：第二代身份证<br>
						&nbsp;&nbsp;&nbsp;b）港澳客户：港澳居民来往内地通行证<br>
						&nbsp;&nbsp;&nbsp;c）台湾客户：台湾居民来往大陆通行证 <br>
						&nbsp;&nbsp;&nbsp;d）外籍客户：国际护照<br> 2. 有效期内的中国驾驶证 <br> 3.
						有效期内的国内/国际信用卡（信用卡额度必须可满足自驾押金预授权要求）
					</p>
				</div>

			</div>
			<div class="order">
				<div class="title">
					<span>费用明细</span>
				</div>
				<div class="fees">
					<div class="fee">
						<span class="name">押金</span> <span class="cha">(含违章保证￥1000)</span><span class="price">￥ <span
							class="number">2000.0</span>
						</span>
					</div>
					<c:if test="${param.type!=0 }">
						<div class="fee">
							<span class="name">司机服务</span> <span class="price">￥ <span
								class="number">100.0</span>
							</span>
						</div>
					</c:if>
					<div class="fee">
						<span class="name">车辆租赁费</span><span class="cha">×${cha }日</span> <span class="price">￥ <span
							class="number">${cars.cmoney*cha }</span>
						</span>
					</div>
				</div>
				<div class="youhuiJF">
					<span>积分抵现</span> <span class="price">￥ <span class="number"><fmt:formatNumber minFractionDigits="1" value="0"/></span>
					</span>
				</div>
				<div class="youhuiQuan">
					<span>优惠减免</span> <span class="price">￥ <span class="number"><fmt:formatNumber minFractionDigits="1" value="0"/></span>
					</span>
				</div>
				<div class="fix">
					<div class="calculate">
						<span>总计：</span> <span class="totalPrice">￥<span
							class="totalNumber"></span></span>
						<p>还车成功立享积分</p>
					</div>
					<button>提交</button>
				</div>
			</div>
		</div>
		<div class="carinfo" data-id="${cars.cid }">
			<div class="title">
				<span>选车信息</span> <a class="comment" href="javascript:void(0)">查看评价>></a>
			</div>
			<div class="info">
				<img class="img" alt="汽车图片" src="statics/image/upload/cars/${cars.cphoto}">
				<div class="detail">
					<a class="modify" href="javascript:void(0)">修改时间和门店>></a>
					<h4>${cars.cname }</h4>
					<p class="info">${cars.cinfo }</p>
					<div class="tr">
						<span>取车</span> <span>还车</span>
					</div>
					<div class="take">
						<p class="place">${quplacename}${quplacestorename }</p>
						<p class="time">${param.quday } ${param.qutime }</p>
					</div>
					<div class="return" <c:if test="${param.type==2 }"> style="display:none;"</c:if>>
						<p class="place">${huanplacename}${huanplacestorename }</p>
						<p class="time">${param.huanday } ${param.huantime }</p>
					</div>
				</div>
			</div>
			<div class="more">
				关于${cars.cname }更多<span>︾</span>
			</div>
			<div class="attrinfo">
			<c:choose>
					<c:when test="${fn:length(attrList)==0}">
						<div>暂无更多信息...</div>
					</c:when>
					<c:otherwise>
						<c:forEach items="${attrList }" var="al">
							<div>
								<span class="name">${al.caName }:</span>
								<span>${al.avValue }</span>
							</div>
						</c:forEach>
					</c:otherwise>
				</c:choose>
			</div>
		</div>
		<div class="userinfo">
			<div class="title">
				<span>用车人信息</span> <a class="option" href="javascript:void(0)">从已有联系人中选择>></a>
			</div>
			<div class="mySelect">
				<span>当前用车人：</span> <span>无</span>
			</div>
			<div class="error">
				<span class="ierror">身份证格式不正确</span>
				<span class="terror">电话格式不正确</span>
			</div>
			<div class="form">
				姓名<input type="text" name="username"> 
				身份证<input type="text" name="identity"> 
				联系电话<input type="text" name="tel">
				<button data-id="${user.uid }">确认</button>
			</div>
		</div>
		<div class="serve">
			<div class="title">
				<span>相关服务</span>
			</div>
			<table class="list">
				<c:forEach items="${serviceList }" var="sl">
					<tr data-id="${sl.osId }" data-name="${sl.osName }"
						data-price="${sl.osPrice}"  >
						<td><input type="checkbox" <c:if test="${sl.osId==1|| sl.osId==2}"> checked="checked" disabled="disabled" </c:if>></td>
						<td><img alt="图标" src="${sl.osPic }"></td>
						<td class="text">${sl.osName }<span>&nbsp;?&nbsp;</span>
							<div class="describe">${sl.osDescribe }</div></td>
						<td style="font-size:16px;">￥${sl.osPrice}</td>
					</tr>
				</c:forEach>
			</table>
		</div>
		<div class="myWallet">
			<div class="title">
				<span>我的钱包</span>
			</div>
			<div class="jf">
				<h4>您拥有积分：<span>${user.ujf}</span></h4>
				请输入积分：<input type="text" name="jf" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"> <span>（积分兑换规则：10积分=1元）</span>
				<p class="tip">您拥有的积分不足！</p>
			</div>
			<div class="discount">
				<h4>选择可使用的优惠券</h4>
				<table>
				<tr>
					<th></th>
					<th>名称</th>
					<th>折扣</th>
					<th>过期时间</th>
					<th>剩余天数</th>
				</tr>
				<c:choose>
					<c:when test="${fn:length(discountList)==0}">
						<tr>
							<td colspan="5">您暂未领取任何优惠券...<a href="huodong">查看活动</a></td>
						</tr>
					</c:when>
					<c:otherwise>
						<c:forEach items="${discountList }" var="dl">
							<tr data-id="${dl.dId }"">
								<td><input type="radio" name="discount" value="${dl.ddiscount}"></td>
								<td>${dl.dName }</td>
								<td>${dl.ddiscount*10}</td>
								<td><fmt:formatDate type="both" value="${dl.ugDate }"/></td>
								<td>${dl.udsTime }</td>
							</tr>
						</c:forEach>
					</c:otherwise>
				</c:choose>
			</table>
			</div>
		</div>
		<div class="contact">
			<div class="title">
				<span>常用联系人</span>
				<span class="close">✖</span>
			</div>
			<table>
				<tr>
					<th></th>
					<th>联系人</th>
					<th>身份证号</th>
					<th>联系方式</th>
				</tr>
				<tbody class="myContact">
				<c:choose>
					<c:when test="${fn:length(addressList)==0}">
						<tr>
							<td colspan="4">您暂未保存任何联系人</td>
						</tr>
					</c:when>
					<c:otherwise>
						<c:forEach items="${addressList }" var="al">
							<tr data-id="${al.uaId }" data-name="${al.uaName }" data-identity="${al.uaIdentity }" data-tel="${al.uaTel }">
								<td><input type="radio" name="people"></td>
								<td>${al.uaName }</td>
								<td>${al.uaIdentity }</td>
								<td>${al.uaTel }</td>
							</tr>
						</c:forEach>
					</c:otherwise>
				</c:choose>
				</tbody>
			</table>
			<button>确定</button>
		</div>
		<div class="confirm">
			<div class="title">
				<span>确认订单</span>
				<span class="close">✖</span>
			</div>
			<div class="content">
				<p class="user">用车人：<span>xxx</span><span>112345435</span></p>
				<div class="info">
					<div class="detail">
						<h4>${cars.cname }</h4>
						<p class="info">${cars.cinfo }</p>
						<div class="tr">
							<span>取车</span> <span>还车</span>
						</div>
						<div class="take">
							<p class="place">${quplacename}${quplacestorename }</p>
							<p class="time">${param.quday }&nbsp;${param.qutime }</p>
						</div>
						<div class="return" <c:if test="${param.type==2 }"> style="display:none;"</c:if>>
							<p class="place">${huanplacename}${huanplacestorename }</p>
							<p class="time">${param.huanday }&nbsp;${param.huantime }</p>
						</div>
					</div>
				</div>
				<span class="pay">需付款金额：<span>xx</span></span>
				<p class="tip">请仔细确认后下单</p>
				<button>确认</button>
			</div>
		</div>
	</div>
	<div class="background"></div>
	<jsp:include page="bottom.jsp"></jsp:include>
</body>
		<div id="comment" data-count="${commentCount }">
			<table>
				<caption>${cars.cname }的评价</caption>
				<c:choose>
					<c:when test="${fn:length(commentList)==0}">
						<tr>
							<td colspan="4">暂无评价</td>
						</tr>
					</c:when>
					<c:otherwise>
						<c:forEach items="${commentList }" var="cl">
							<tbody>
								<tr>
									<td>${cl.ccContent }</td>
								</tr>
								<tr>
									<td class="ctime"><fmt:formatDate type="both" value="${cl.ccTime }"/></td>
								</tr>
							</tbody>
						</c:forEach>
					</c:otherwise>
				</c:choose>
			</table>
			<div class="M-box"></div>
		</div>
</html>